package com.fansaikj.erp.domain;

/*
 * Copyright © 2020-2035 erupt.xyz All rights reserved.
 * Author: YuePeng (erupts@126.com)
 */

import javax.persistence.*;

import lombok.Data;
import lombok.EqualsAndHashCode;
import xyz.erupt.annotation.*;
import xyz.erupt.annotation.sub_erupt.*;
import xyz.erupt.annotation.sub_field.*;
import xyz.erupt.annotation.sub_field.sub_edit.*;
import xyz.erupt.jpa.model.BaseModel;

import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Erupt(
        name = "发票税率",
        power = @Power(add = true, delete = true,
                edit = true, query = true, viewDetails = true,
                importable = true, export = true)
)
@Table(name = "erp_invoice_tax_rate")
@Entity
@Data
public class InvoiceTaxRate extends BaseModel {

    @EruptField(
            views = @View(
                    title = "", show = false
            ),
            edit = @Edit(
                    title = "",
                    type = EditType.INPUT, show = false, notNull = true,
                    inputType = @InputType
            )
    )
    private Long id;

    @EruptField(
            views = @View(
                    title = "发票类型"
            ),
            edit = @Edit(
                    title = "发票类型",
                    search = @Search,
                    type = EditType.INPUT,
                    inputType = @InputType
            )
    )
    private String invoiceType;

    @EruptField(
            views = @View(
                    title = "税率（%）"
            ),
            edit = @Edit(
                    title = "税率（%）",
                    type = EditType.INPUT,
                    inputType = @InputType
            )
    )
    private String taxRate;

    @EruptField(
            views = @View(
                    title = "创建人", show = false
            ),
            edit = @Edit(
                    title = "创建人",
                    type = EditType.INPUT, show = false,
                    inputType = @InputType
            )
    )
    private String createBy;

    @EruptField(
            views = @View(
                    title = "创建日期", show = false
            ),
            edit = @Edit(
                    title = "创建日期",
                    type = EditType.DATE, show = false,
                    dateType = @DateType
            )
    )
    private Date createTime;

    @EruptField(
            views = @View(
                    title = "更新人", show = false
            ),
            edit = @Edit(
                    title = "更新人",
                    type = EditType.INPUT, show = false,
                    inputType = @InputType
            )
    )
    private String updateBy;

    @EruptField(
            views = @View(
                    title = "更新日期", show = false
            ),
            edit = @Edit(
                    title = "更新日期",
                    type = EditType.DATE, show = false,
                    dateType = @DateType
            )
    )
    private Date updateTime;

    @EruptField(
            views = @View(
                    title = "所属部门",
                    show = false
            ),
            edit = @Edit(
                    show = false,
                    title = "所属部门",
                    type = EditType.INPUT,
                    inputType = @InputType
            )
    )
    private String sysOrgCode;

    @EruptField(
            views = @View(
                    title = "备注"
            ),
            edit = @Edit(
                    title = "备注",
                    type = EditType.TEXTAREA
            )
    )
    private String remark;

    @EruptField(
            views = @View(
                    title = "删除状态(0-正常,1-已删除)", show = false
            ),
            edit = @Edit(
                    title = "删除状态(0-正常,1-已删除)",
                    type = EditType.INPUT, show = false,
                    inputType = @InputType
            )
    )
    private String delFlag;

}
